<!doctype html>
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/mobile/include/include.jsp" %>
<html lang="cn">
<head>
    <%@ include file="/jsp/mobile/include/header.jsp" %>
    <title>设置支付密码</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        input {
            margin: 0;
            padding: 0;
            width: 1px;
            opacity: 0;
            height: 1px;
            border: none;
        }

        label {
            display: block;
        }

        ul {
            border: 1px solid #e6e6e6;
            font-size: 0;
            display: inline-block;
            position: relative;
            font-size: 0;
        }

        ul li {
            display: inline-block;
            background-color: white;
            width: 50px;
            height: 50px;
            font-size: 24px;
            font-weight: 700;
            text-align: center;
            line-height: 55px;
            border-left: 1px solid #e6e6e6;
            vertical-align: middle;
            overflow: hidden;
        }

        ul li:first-child {
            border-left: none;
        }
    </style>
</head>

<body>
<%--<div class="head">--%>
<%--<div class="auto">--%>
<%--<span class="tit">设置支付密码</span>--%>
<%--<a class="return">--%>
<%--<i class="ico ico1"></i>--%>
<%--返回--%>
<%--</a>--%>
<%--</div>--%>
<%--</div>--%>
<div class="main">
    <div class="p20 gray3 f16" align="center">请设置支付密码，以验证身份</div>
    <form id="pwdForm"
    			action="<%=request.getContextPath()%>/mobile/index/setPayPwd">
    <div class="edPsd">
        <label for="payPwd">
            <ul>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </label>
        <input type="tel" id="payPwd" name="payPwd" maxlength="6">
        <input type="hidden" id="operatorType" name="operatorType" value="${operatorType}">
    </div>
    </form>
</div>
</body>
<script>
    $('#payPwd').on('input', function (e) {
        var numLen = 6;
        var pw = $('#payPwd').val();
        var list = $('li');
        for (var i = 0; i < numLen; i++) {
            if (pw[i]) {
                $(list[i]).text('*');
            } else {
                $(list[i]).text('');
            }
        }
        if(pw.length == 6)//够6位直接提交
        {
            $("#pwdForm").submit();
        }
    });
</script>
</html>